*****This figure draws on several data sets:  from the CCES CC file, district mean ideology and 
*****mean ideology of Democratic and Republican identifiers; from the informant surveys the candidates'
*****ideological positions (corrected for partisan bias and aggregated to district level); and also from  
*****the informant file, the mean ideological positions of Democratic and Republican activists, where we 
*****treat informants as activists because they are either national convention delegates or well informed
*****and highly interested YouGov/Polimetrix panelists residet in the sample districts.  

use "figure4_data.dta"

*Figure 4 
twoway (lowess districtlibconmean rpresvote)(lowess demidentifiersmean rpresvote) ///
(lowess repubidentifiersmean rpresvote) (lowess dlc_pc10 rpresvote)(lowess rlc_pc10 rpresvote) ///
 (lowess demactivistsmean rpresvote)(lowess repubactivistsmean rpresvote)
